#include "junix.h"

int main(int argc, char **argv)
{
	char *p=NULL;
	ssize_t len;
	mtrace();

	while(getline(&p,&len, stdin) != -1)//use realloc
	{
		printf("size:%d\n",len);
		printf("msg:%s\n",p);
		free(p);
		p=NULL;// this is a must
	}
	free(p);

    exit(0);
}

